let MyPromise = require('./MyPromise');

//新建一个MyPromise类，resolve代表请求成功，reject代表请求失败
let myInstance = new MyPromise((resolve, reject) => {
    reject('为什么难过');
    console.log('basic information');
}).then((value) => {
    console.log(`then值：${value}`);
}).catch((failure) => {
    console.log(`failure: \n${failure}`);
});
